import React from "react";
export default class TableHeader extends React.Component {
    render() {
        const data = this.props.sections.map((item, index)=> {
            return (
                <th key={index}>{item}</th>
            )
        });
        return (
            <thead>
            <tr>{data}</tr>
            </thead>
        )
    }
}

TableHeader.propTypes = {
    sections: React.PropTypes.array.isRequired
};